Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
C#
1) 2D Graphics
2) ADO Database
3) Class Interface
4) Collections Data Structure
5) Components
6) Data Types
7) Date Time
8) Design Patterns
9) Development Class
10) Event
11) File Stream
12) Generics
13) GUI Windows Form
14) Internationalization
15) Language Basics
16) LINQ
17) Network
18) Office
19) Reflection
20) Regular Expressions
21) Security
22) Services Event
23) Thread
24) Web Services
25) Windows
26) WPF
27) XML
28) XML LINQ
File Stream
1) A help program that uses a disk file to store help information
2) A simple disk-to-screen utility that demonstrates a FileReader
3) A simple key-to-disk utility that demonstrates a StreamWriter
4) Action Text Reader Line
5) Add OutputStream and InputStream to IDbCommand
6) An enhanced cipher component that maintains a log file
7) Append a suffix (such as a date) to the name of the file
8) Append File methods
9) Append To File
10) Append various data types to byte array
11) Asynchronous Writing, Asynchronous Reading
12) Asynchronously reads a stream
13) Authentication Stream
14) Available Free Space
15) Backup File
16) Binary Serializer
17) Binary Writer Reader
18) BinaryWriter and BinaryReader classes for the writing and reading of primitive types
19) Bit Array To Byte Array
20) Bit Array To Byte Array (2)
21) BitConvert in action
22) Buffered InputStream
23) Builds a bracketed CSV list from the array
24) Builds a CSV list from the specified int[], separator String and quote String
25) Builds a CSV list from the specified String[], separator string and quote string
26) Byte Array To String
27) Byte Arrays Are Equal
28) Byte Endian
29) Byte-Oriented
30) Byte-Oriented File input and output
31) Bytes Equal
32) Bytes To Comma Separated List
33) Bytes To Formatted String
34) C# Implementation of the File Copy Command
35) C# Serialization
36) Calculate Directory Size
37) Calculate Relative Path
38) Calculate the size of a directory and its subdirectories, if any, and displays the total size in bytes
39) Calculates the size of a directory and its subdirectories, if any, and displays the total size in bytes
40) Can read and write
41) Catch file read exception and retry
42) Changes the current working directory and then lists the files in the directory
43) Check drive free space
44) Check file Attribute
45) Check the Existance of a Directory
46) Checks a directory path and returns a normalized form with trailing
47) Checks if a file have write permissions
48) Checks if a given file exists
49) Checks if path provided corresponds to a directory
50) Checks if the giving File exists, and returns its length
51) Checks if the input byte array contains only safe values, the data does not need to be encoded for use with LDIF
52) Class, which describes folder with its subfolders
53) Clean a directory without deleting it
54) Clean File Name
55) Clone With Serialization
56) Collection Serialization
57) Combine base Path and relative Path
58) Combine paths
59) Combines an array of strings into a path
60) Combines four strings into a path
61) Combines three strings into a path
62) Combines two path strings
63) Combines two paths, removing root-folder combinations
64) Combines two strings into a path
65) CompanyName
66) Compare Byte Array Elements
67) Compare Bytes
68) Compare two files
69) Compare two files byte by byte
70) Compares 2 files and determines if they are the same or not
71) Compares the content of 2 files
72) Compares the specified file1 This method accepts two strings the represent two files to compare
73) Compares the values of two byte arrays, and returns true only if every array member is identical
74) Compares two rooted paths for equality Any of the paths provided may end with path separator - it will be ignored
75) Compares up to n elements of byte array a[] against byte array b[]
76) CompressesDecompress the specified data
77) Compressuncompress
78) Construct StreamWriter from FileSream
79) Conversions between complex types and byte arrays
80) Convert a byte array to an Object
81) Convert a byte array to string using default encoding
82) Convert a string into an array of bytes
83) Convert an object to a byte array
84) Convert byte array into a string
85) Convert Byte array to Base64 Char Array
86) Convert from a URL to a FileInfo
87) Convert to easy-to-read byte value
88) Convert To Legal File Name
89) Convert UTF-8 and ASCII encoded bytes back to UTF-16 encoded string
90) Converts a number of bytes into a more easily read form
91) Converts a number of bytes to a shorter, more readable string representation
92) Copies an Stream into another Stream
93) Copies one stream into another
94) Copies the specified resource to a temporary file and returns its path
95) Copy a file
96) Copy a file to a different filename, with cleaning null characters
97) Copy a object by content,not by reference
98) Copy as much data as possible for a read operation
99) Copy directories with DirectoryInfo
100) Copy directory
101) Copy file and folder
102) Copy file from source to destination
103) Copy folder
104) Copy from one file to another file
105) Copy one folder to another folder
106) Copy one Stream to another Stream
107) Copy Stream
108) Copy Stream and close
109) Copy Stream from fromStream to toStream
110) Copy,delete file and directory
111) Copying A File
112) Create a file stream with new FileStream(test bin, FileMode Create)
113) Create a FileStream for the BufferedStream
114) Create a large file of 100 lines to upload
115) Create a MemoryStream
116) Create a new instance of the StreamReader class for the specified stream
117) Create a StreamWriter in UTF8 mode
118) Create Directory
119) Create DriveInfo object from FullName of FileInfo
120) Create FileStream class with the specified path and creation mode
121) Create FileStream for ASCII encoding
122) Create FileStream from FileInfo
123) Create FileStream with specified path, creation mode, readwrite and sharing permission
124) Create new nested directories
125) Create Stream from FileInfo from OpenText method
126) Create StreamReader from File Stream
127) Create StreamWriter class for the specified stream, using the specified encoding and the default buffer size
128) Create StreamWriter from file name
129) Create StreamWriter from FileStream
130) Create StreamWriter with encoding
131) Create Temp File
132) Create Thumbnail
133) Create Thumbnail Image
134) Create UTF8 encoding StreamWriter from File name
135) Creates a relative path from absolute pathfilename and a reference path
136) Creates a relative path from one file or folder to another
137) Creates a relative path to targetFile that is relative to path
138) Creates all directories and subdirectories in the specified path
139) Creates or opens a file for writing and writes text to it
140) Creating a sequential-access file
141) Creating Files
142) Csv Parser
143) Current Dir
144) CurrentSize and Scope
145) Deep clone with MemoryStream
146) Deep Copy with MemoryStream
147) DeflateStream provides methods and properties for compressing and decompressing streams using the Deflate algorithm
148) Delete a file
149) Delete a file if exist
150) Deletes an empty directory from a specified path
151) Deletes files newer than the specified date
152) Deletes the directory any subdirectories and files in the directory
153) Deleting Files
154) Demonstrate MemoryStream
155) Demonstrate random access
156) Demonstrate StringReader and StringWriter
157) Demonstrate the use of the Null stream as a bit bucket
158) Demonstrates attaching a StreamReader object to a stream
159) Demonstrates attaching a StreamWriter object to a stream
160) Demonstrates openingcreating a file for writing and truncating its length to 0 bytes
161) Demonstrates reading a file into memory, attaching it to a MemoryStream and using stream methods to access the contents
162) Demonstrates seeking to a position in a file from the end
163) Deserialize
164) Deserialize Object
165) Deserialize the incomming data to the T datatype, this method used to deserialize the test cases data to the required entity.t
166) Deserializes an object from binary
167) Determine if the directory is empty, ie no files and no sub-directories
168) Determines if a directory exists
169) Determines whether the given path refers to an existing directory on disk
170) Directory Class
171) Directory Class xxposes static methods for creating, moving, and enumerating through directories and subdirectories
172) Directory Counter
173) Directory listing
174) Directory Object
175) Directory Tree Host
176) Directory Walker
177) Display a text file
178) Drive Format
179) Drive Type
180) DriveInfo Class Provides access to information on a drive
181) DriveInfo(file FullName) Name
182) Empty a Folder
183) Encoding
184) Encoding ASCII GetString
185) Encoding BigEndianUnicode GetString
186) Encoding in action
187) Encoding URF8UnicodeUTF32 GetBytes
188) Encoding URF8UnicodeUTF32GetString
189) Enumerate Lines for StreamReader
190) Enumerate non-empty Lines for StreamReader
191) Execute File
192) Extends BinaryReader
193) Extends IDeserializationCallback
194) Extracts a path part of a full path filename, searching for the last directory separator or column
195) Fifo Stream
196) File AppendAllLines Method Appends lines to a file, and then closes the file
197) File AppendAllText Method Appends the string to the file, creating the file if it does not exist
198) File AppendAllText Opens a file, appends the specified string to the file
199) File AppendText Creates a StreamWriter that appends UTF-8 encoded text to an existing file
200) File Class
201) File class to check whether a file exists, open and read
202) File Copy Method Copies file to a new file
203) File Create Creates or overwrites a file in the specified path
204) File Create Method (String, Int32) Creates or overwrites the specified file
205) File CreateText Method Creates or opens a file for writing UTF-8 encoded text
206) File Decrypt Decrypts a file
207) File Exists Determines whether the specified file exists
208) File GetAccessControl Gets a FileSecurity object that encapsulates the access control list
209) File GetAttributes Method Gets the FileAttributes of the file on the path
210) File GetCreationTime Method Returns the creation date and time of the specified file or directory
211) File GetLastAccessTime Method Returns the date and time the specified file or directory was last accessed
212) File GetLastWriteTime Returns the date and time the specified file or directory was last written to
213) File Move Implementation
214) File Move Moves a file to a new location
215) File Open Method (String, FileMode, FileAccess)
216) File Open Method (String, FileMode, FileAccess, FileShare)
217) File Open Opens a FileStream on the specified path with readwrite access
218) File OpenRead Method Opens an existing file for reading
219) File OpenText Method Opens an existing UTF-8 encoded text file for reading
220) File OpenText returns a StreamReader
221) File OpenWrite Method Opens an existing file or creates a new file for writing
222) File Path Collection
223) File pointer move and read binary file
224) File ReadAllLines Method (String, Encoding)
225) File ReadAllLines Method Opens a text file, reads all lines of the file, and then closes the file
226) File ReadLines Method
227) File Renamer
228) File Replace Replaces contents of file
229) File Search
230) File SetLastAccessTime Sets the date and time the specified file was last accessed
231) File SetLastWriteTime
232) File size format
233) File System Watcher Demo
234) File Watcher
235) FileDescription
236) FileSecurity Class
237) FileStream Class supporting both synchronous and asynchronous read and write operations
238) FileStream with FileMode Create and FileMode Open
239) FileSystemEventArgs
240) FileSystemInfo Class provides the base class for both FileInfo and DirectoryInfo objects
241) FileSystemInfo LastAccessTime Property gets or sets the time the current file or directory was last accessed
242) FileVersion
243) FileVersionInfo FileName
244) Find all files in a directory, and all files within every nested directory
245) Find all files in a directory, and all files within every nested directory (2)
246) Find Files That Match a Wildcard Expression
247) Find string in a file
248) Format Byte in B, KB, MB, GB
249) Format File Size
250) Formats the path
251) Full Name Without Extension
252) Get a 32x32 icon for a given file
253) Get a collection of file names that match a search pattern, and optionally searches subdirectories
254) Get a list of invalid file characters
255) Get a list of invalid path characters
256) Get all the files that matches a wildcard pattern, eg ( tmp)
257) Get an array of files info from a directory
258) Get Application Path
259) Get Application Relative Path
260) Get bytes and read bytes
261) Get collection of directory names that match a search pattern, and optionally searches subdirectories
262) Get Content Type by Extension
263) Get Creation Time
264) Get Current Directory
265) Get Directory information from FileInfo
266) Get directory name and file information in that directory
267) Get Directory properties from DirectionInfo class
268) Get Execution Path
269) Get File Access Control
270) Get file attribute
271) Get File Attributes from FileInfo
272) Get File Bytes And Readable Size Information
273) Get file Creation Time
274) Get file Creation time from FileInfo
275) Get file extension
276) Get File Name
277) Get File Name From Path
278) Get file name from path string
279) Get File SystemInfo
280) Get file type from path string
281) Get Files from a directory
282) Get Files Get Folders methods
283) Get full path
284) Get Full Path Without Extension
285) Get Image Type Extension
286) Get Last Access Time
287) Get Last updated, accessed and write time
288) Get Last Write Time
289) Get Name, Parent, Exists properties from DirectoryInfo class
290) Get Path from path string
291) Get Relative Path
292) Get relative path (2)
293) Get string from byte array
294) Get temp file name
295) Get temp path
296) Get the byte array from a string using default encoding
297) GetFileNames, CreateDirectory, GetUserStoreForAssembly
298) Gets a DirectorySecurity object that encapsulates the access control list (ACL) entries
299) Gets a files contents
300) Gets a files contents (Used primarily for text documents on an FTP)
301) Gets a files contents from a Url
302) Gets a files contents from a Url and save to an OutputStream
303) Gets a files contents from an Url with NetworkCredential
304) Gets a files contents with MemoryStream
305) Gets a list of files
306) Gets a value indicating whether the current stream supports reading
307) Gets a value indicating whether the current stream supports seeking
308) Gets a value indicating whether the current stream supports writing
309) Gets an array of directories matching the specified search pattern from the current directory
310) Gets information about the files in a directory and puts it in an array of strings
311) Gets last write time for a file
312) Gets the common root path of the given path list
313) Gets the creation date and time of a directory
314) Gets the creation date and time, in Coordinated Universal Time (UTC) format, of a directory
315) Gets the current character encoding that the current StreamReader object is using
316) Gets the current working directory of the application
317) Gets the extension without the dot
318) Gets the file size text
319) Gets the names of subdirectories in the specified directory
320) Gets the path of the current request relative to the application base path
321) Gets the relative path
322) Gets the relative path from a source to a target path
323) Gets the size of all files within a directory
324) Guess Text File Encoding
325) GZipStream Class provides methods and properties used to compress and decompress streams
326) Hex value Dump
327) Illustrates asymmetric cryptography
328) Illustrates asynchronous IO
329) Illustrates binary serialization
330) Illustrates declarative role-based security
331) Illustrates decrypting a file
332) Illustrates demanding permissions
333) Illustrates encrypting a file
334) Illustrates random access to a file
335) Illustrates reading and writing binary data
336) Illustrates reading and writing text data
337) Illustrates recursive Directory use
338) Illustrates the Directory class
339) Illustrates the Directory class 2
340) Illustrates the FileAttributes enumeration
341) Illustrates the FileInfo class
342) Illustrates the FileSystemWatcher class
343) Illustrates use of BufferedStreams
344) Illustrates use of FileStreams
345) Illustrates use of FileStreams 2
346) Illustrates use of MemoryStreams
347) ImageFormat to Extension
348) Implements the same behaviour as the touch utility on Unix
349) Initializes a new instance of the StringWriter class
350) Initializes a new instance of the StringWriter class that writes to the specified StringBuilder
351) Initializes a new instance of the StringWriter class with the specified format control
352) Instance methods for creating, moving, and enumerating through directories and subdirectories
353) Int to byte array converter
354) InternalName
355) Is Drive Ready
356) Is File Existed
357) Is File readable or writeable
358) Is valid path name
359) IsDebug
360) Isolated Storage File Stream form input and output
361) IsolatedStorageFile represents an isolated storage area containing files and directories
362) IsPatched
363) IsPreRelease
364) IsPrivateBuild
365) IsSpecialBuild
366) Javascript Serializer
367) LegalCopyright
368) Listens to the file system change notifications and raises events
369) Make Absolute Path
370) Make file writable and copy
371) Manipulating a string read as a line from a file
372) Map Path
373) Memory-Mapped Files
374) MemoryStream ToArray, MemoryStream ReadDecimal
375) MemoryStream Write
376) Moving A Files
377) Name Without Extension
378) New BinaryReader(stream)
379) New BinaryWriter(stream) and Write method
380) NonSerialized attributes
381) Object to byte array serializationDeserialization
382) Object to string serializationDeserialization
383) On file created or deleted
384) Open a file using StreamWriter
385) Open and Append to a Log File
386) Open Existing File
387) OriginalFilename
388) Outputs data from a read stream to a newly created file
389) Pad bytes
390) Page Filter Stream
391) Path GetTempFileName
392) Paths in C#
393) Performs operations on String instances that contain file or directory path information
394) ProductName
395) ProductVersion
396) Provides access to information on a drive
397) Query file name with Linq
398) Read a single character
399) Read a text file and obtain its contents
400) Read all bytes from GZipStream
401) Read all the content from a file as byte array
402) Read all the content from a file as string in default encoding
403) Read and Write a Binary File
404) Read and Write a Text File
405) Read and Write to a Newly Created Data File
406) Read ASCII string from byte buffer
407) Read binary context of a file
408) Read byte array from file
409) Read data in line by line
410) Read entire stream into a byte array
411) Read file content to a byte array
412) Read file fully
413) Read from a Stream ensuring all the required data is read
414) Read from stream
415) Read Stream to Byte array
416) Read Stream to End
417) Read Stream to fill the byte array
418) Read Struct out of a file with BinaryReader
419) Read Text File From Ressource
420) Read text file line by line
421) Read text file line by line with exception catch
422) Read text file with File OpenText
423) Read Text from a File
424) Read the content of the text file
425) Read the data from a file and desiralize it
426) Read the given filename and yield return a string
427) Read whole text file to the end
428) Reading a sequential-access file
429) Reading and Writing Files
430) Reading from a text file line by line
431) Reads a block of bytes from the stream and writes the data in a given buffer
432) Reads a file into a byte array
433) Reads a line of characters from the current stream and returns the data as a string
434) Reads a maximum of count characters from the current stream into buffer, beginning at index
435) Reads a stream into a byte array
436) Reads an ASCII encoded file and writes the text to another file in wide character format
437) Reads and displays bytes until end-of-file
438) Reads lines separated by vertical bars
439) Reads strings from a file created in a text editor
440) Reads text from a file
441) Reads the next character from the input stream and advances the character position by one character
442) Reads the stream from the current position to the end of the stream
443) ReadWrite File Transacted
444) Redirects to a path relative to the application base path
445) Reinitializes a byte array to the given value in an optimized way
446) Relative Paths
447) Remove a file or similar files if wildcard is included
448) Removes a directory as best as it can Errors are ignored
449) Removes invalid charactes from filenames, like the slash and backslash
450) Removes invalid file name characters from the specified string
451) Rename File Extension
452) Rename File Name
453) Renames a file
454) Replace in file
455) Replace String In File
456) Resolve Path
457) Restrict a list of files to valid extensions only
458) Retrieves the date from the beginning of the WinSat filename and creates a datetime object from it
459) Return true if the filename has the given attribute set
460) Returns a human-readable version of the file size (original is in bytes)
461) Returns a temporary file path to for use in creating a new package
462) Returns an array of abstract pathnames representing the files and directories of the specified path
463) Returns an enumerable collection of directory names in a specified path
464) Returns an enumerable collection of directory names that match a search pattern in a specified path
465) Returns an enumerable collection of file names in a specified path
466) Returns an enumerable collection of file names that match a search pattern in a specified path
467) Returns the date and time the specified file or directory was last accessed
468) Returns the date and time the specified file or directory was last written to
469) Returns the names of all files and subdirectories in the specified directory
470) Returns the names of files that match the specified search pattern
471) Returns the next available character but does not consume it
472) Returns the number of lines appearing in target where a line is counted as a n
473) Returns the path argument adjusted to be relative to the base path Absolute path names will be returned unchanged
474) Returns the raw number of the current line count
475) Returns the volume information, root information, or both for the specified path
476) Returns the zero-based line number where source appears in target
477) Returns true if the file specified by the pathname is a hidden file
478) Root Directory
479) Save a byte array content into a file
480) Save byte array to a file
481) Save Byte Array To File
482) Saves a file
483) Saves a file to an FTP server
484) Saves the text to a file
485) Search a byte array for a sub byte array
486) Seek from Begin
487) Send a file to the recycle bin
488) Serial Employee class
489) Serialization Utilities
490) Serialization Utility
491) Serialize and DeSerialize
492) Serialize and Deserialize (2)
493) Serialize Class to Soap message
494) Serialize hiearchy classes
495) Serialize to SOAP based XML file
496) Serializes an object to binary
497) Serializes and object to a stream It will flush and close the underlying stream
498) Set Current Directory
499) Set File IO Permission to c
500) Set NotifyFilter of FileSystemWatcher
501) Set StreamWriter buffer size
502) Set XML tag name for Serialization
503) Sets the current position of this stream to the given value
504) Sets the date and time a directory was last written to
505) Sets the date and time the specified file or directory was last accessed
506) Sets the read-only property of the file to true
507) Split the path into array of string
508) Stream CanRead indicates whether the current stream supports reading
509) Stream CanWrite Property indicates whether the current stream supports writing
510) Stream Converter
511) Stream CopyTo reads all the bytes from the current stream and writes them to the destination stream
512) Stream Read reads a sequence of bytes and advances the position
513) StreamReader And Writer
514) StreamReader ReadLine
515) StreamWriter and BinaryWriter
516) String to ASCII
517) StringWriter implements a TextWriter for writing information to a string The information is stored in an underlying StringBuil
518) Swap Byte Order
519) Synchronous Writing, Asynchronous Reading
520) Tests if the specified file is newer than the reference file
521) Text file Write with format and write boolean value to a text file
522) Text Reader
523) The hex dump program
524) The use of a buffered stream to serve as intermediate data holder for another stream
525) This class provides basic facilities for manipulating temporary files
526) This class reads and writes zip files
527) Three types of Serialization
528) Traversing Directories
529) Try and catch exceptions for StreamWriter
530) Use BinaryReader and BinaryWriter to implement a simple inventory program
531) Use BitConvert to convert String, Boolean and Int32
532) Use GZipStream to Zip
533) Use MemoryStream and BinaryReader to convert Byte array to decimal
534) Use MemoryStream and BinaryWriter to convert decimal to byte array
535) Use Serializable attribute to mark a class
536) Use Serializable attribute to mark a generic class
537) Use SoapFormatter
538) Use static methods in Path
539) Use StreamWriter to create a text file
540) Use StringWriter to write string
541) Use the FileInfo Class to Delete Files with Ease
542) Use XML Serialization with Custom Objects
543) Uses methods in the File class to check the status of a file
544) Uses methods in the File class to check whether a file exists
545) Uses StreamReader and StreamWriter object using different encoding to translate a file from one to another
546) Uses the DirectoryInfo class to recursively show subdirectories
547) Using FileStreams
548) Using MemoryStream to Serialize and Desirialize
549) Using StreamWriter 3
550) Using String Reader
551) UTF8 decoder
552) UTF8 encoding StreamWriter
553) Utility class that provides methods to manipulate stream of data
554) Utility method to compare two byte arrays for equality
555) Working with the BinaryReader Class
556) Working with the BinaryWriter Class
557) Working with the Serializable Attribute
558) Write a byte array to a file
559) Write a value at a given position Used to write a size of data in an earlier located header
560) Write and then read back binary data
561) Write byte array to a file
562) Write File methods
563) Write string to a text file
564) Write Text to a File
565) Write to a file
566) Write To File
567) Writes a subarray of characters to the stream
568) Writes out a string to a file
569) Writes the same string to a file and to the screen using a common method